package com.loser.rpc.user.fallback;

import com.loser.module.base.common.APiResponsePage;
import com.loser.module.base.common.ApiResponse;
import com.loser.rpc.user.dto.req.UserPageReq;
import com.loser.rpc.user.dto.req.UserSaveReq;
import com.loser.rpc.user.dto.req.UserUpdateReq;
import com.loser.rpc.user.dto.resp.UserInfoResp;
import com.loser.rpc.user.rpc.UserFeign;
import org.springframework.stereotype.Component;

@Component
public class UserFeignFallBack implements UserFeign {

    @Override
    public ApiResponse<Boolean> save(UserSaveReq req) {
        return ApiResponse.ok(false);
    }

    @Override
    public ApiResponse<Boolean> update(UserUpdateReq req) {
        return ApiResponse.ok(false);
    }

    @Override
    public ApiResponse<Boolean> deleteById(Long id) {
        return ApiResponse.ok(false);
    }

    @Override
    public ApiResponse<UserInfoResp> getById(Long id) {
        return ApiResponse.ok(new UserInfoResp());
    }

    @Override
    public APiResponsePage<UserInfoResp, Object> queryList(UserPageReq req) {
        return APiResponsePage.ok();
    }

}
